Modding Core Logic
Dependencies
- Zip Handling:
adm-zip - Networking:
fetch(native) oraxios(if added) - Path Manipulation:
path(Node.js built-in)
Domain Entities
- Mod: A modifiction package.
- Profile: A collection of enabled mods.
- GameBanana: The primary source for online mods.
Key Directories
- Game Directory: Where the game is installed (e.g.,
Steam/steamapps/common/...). - Mods Directory: Where mods are stored (often a subfolder of the game or a dedicated
modsfolder).
Common Tasks
Installing a Mod
- Extract the zip file using
adm-zip. - Validate the structure (check for specific mod files).
- Move files to the correct destination in the game directory.
- Record the installation in
installed-mods.json(or database).
Uninstalling a Mod
- Look up files associated with the mod.
- Remove files safely.
- Update specific config files if necessary.
- Remove entry from
installed-mods.json.
GameBanana Integration
- Fetch mod info using GameBanana API endpoints.
- Map API responses to the internal
OnlineModinterface. - Handle rate limiting and errors gracefully.